[16.0] intrastat_product: add confirmed state + several small fixes/improvements #260
+92
−31
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add a third step "confirmed" between "draft" and "done". It is necessary to have error messages of XML file generation that refer to declaration lines. It was my idea to generate the declaration lines and the XML at the same time ; but real life experience showed it was not a good idea (sorry for that !). Some error messages that block XML generation could refer to computation lines but not all, because, for the fields that are summed in declaration lines, you really need to check the value in the declaration line and point to it if the value is bad.
Add a new field "line_number" on declaration line, to be used in error message when generating XML file.
Add store=True on 3 computed fields (reporting_level on declaration, src_dest_country_code and product_origin_country_code on computation lines). It fixes a bug on src_dest_country_code and product_origin_country_code on computation lines, when you could not set manually a country code while leaving the m2o field empty.
Improve display_name of intrastat.product.declaration
note field moved from fields.Text to fields.Html